package com.avic.rong.api.collect;

import com.avic.rong.api.HttpPostService;
import com.example.minato.minastore.BaseApi;
import com.example.minato.minastore.listener.HttpOnNextListener;
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity;

import io.reactivex.Observable;
import retrofit2.Retrofit;

public class ArticleCollectApi extends BaseApi {


    private String token;
    private int offset;
    private int limit;

    public void setOffset(int offset) {
        this.offset = offset;
    }

    public void setArgument(String token, int offset, int limit){
        this.token = token;
        this.offset = offset;
        this.limit = limit;
    }

    public ArticleCollectApi(RxAppCompatActivity rxAppCompatActivity, HttpOnNextListener listener) {
        super(rxAppCompatActivity, listener);
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostService httpPostService = retrofit.create(HttpPostService.class);
        return httpPostService.articleCollect(token,offset,limit);
    }
}
